#include<bits/stdc++.h>
using namespace std;

int n, m, k, ans, dx[2] = {0, 1}, dy[2] = {1, 0};
char cmap[105][105];

void dfs(int x, int y, int i, int r){
	if(r >= k){
		ans++;
		return;
	}
	int a = x + dx[i]; int b = y + dy[i];
	if(cmap[a][b] != '.' || a < 1 || b < 1 || a > n || b > m) return;
	dfs(x+dx[i], y+dy[i], i, r+1);
	return;
}

int main()
{   
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++){
    	for(int j = 1; j <= m; j++){
    		cin >> cmap[i][j];
		}
	}
    for(int i = 1; i <= n; i++){
    	for(int j = 1; j <= m; j++){
    		if(cmap[i][j] == '.')
     		for(int t = 0; t < 2; t++)
     		dfs(i, j, t, 1);
		}
	}
	if(k == 1)
        ans /= 2;
	cout << ans << endl;
	return 0;
}
